﻿using System;
using Microsoft.Xna.Framework;

namespace OrganizedConfusion.Game_Objects
{
    public class Spikes : BaseObject
    {
        public Spikes()
        {
            type = BaseObject.OBJ_TYPE.OBJ_SPIKE;
        }

        public void Update(GameTime gametime)
        {

        }

        public override bool CheckCollision(BaseObject obj)
        {
            // TODO: Do collision on player, reset level if hit.
            if (obj.Type != (int)OBJ_TYPE.OBJ_PLAYER)
                return false;

            Rectangle rtnRect = Rectangle.Intersect(obj.CreateCollisionRect(), CreateCollisionRect());

            // Make the collosion check much cleaner. OPTIONAL: Circle collision
            //if (rtnRect.Width != 0 && rtnRect.Height != 0)
            //    Do event sending here

            return false;
        }
    }
}
